package com.controller;

import com.domain.Enterprise2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/book")
public class BookController2 {
    @Autowired
    private Enterprise2 enterprise2;

    @GetMapping("/{id}")
    public String getById(@PathVariable int id){
        System.out.println(enterprise2.getAge());
        System.out.println(enterprise2.getName());
        System.out.println(enterprise2.getTel());
        System.out.println(enterprise2.getSubject());
        System.out.println("id==>"+id);
        return "hello spring boot";
    }



}
